import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 获取退货单信息
export const getReturnInfo = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/saleReturn`, { params });

// 获取审批通过的配件订单
export const getPartOrder = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/saleReturn/getpartorder`, { params });

// 获取退货配件
export const getPartInfo = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/saleReturn/getpartinfo`, { params });

// 获取退货配件
export const saveReturnInfo = params => axios.post(`${SERVER.CMSCLOUD_WMS}/part/saleReturn/saveinfo`, params);

// 获取退货配件根据退货单id
export const getPartsByReturnID = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/saleReturn/getpartsbyid`, { params });

// 获取待审核退货单信息
export const getRevierwReturnList = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/saleReturn/getreviewreturnlist`, { params });

// 获取中心库信息
export const getAllWareHouse = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/warehouseDealer/getAllWareHouse`, { params });

// 配件导入
export const imReturnPart = params => axios.post(`${SERVER.CMSCLOUD_WMS}/part/saleReturn/importReturnPart`, params);

